#ifndef AVI_PRIVATE_H
#define AVI_PRIVATE_H
#include <QString>
#include <QByteArray>
#include <QList>
struct gwavi_header_t //avih
{
    quint32 time_delay;	/* dwMicroSecPerFrame */
    quint32 data_rate;		/* dwMaxBytesPerSec */
    quint32 reserved;
    quint32 flags;		/* dwFlags */
    quint32 number_of_frames;	/* dwTotalFrames */
    quint32 initial_frames;	/* dwInitialFrames */
    quint32 data_streams;	/* dwStreams */
    quint32 buffer_size;	/* dwSuggestedBufferSize */
    quint32 width;		/* dwWidth */
    quint32 height;		/* dwHeight */
    quint32 time_scale;
    quint32 playback_data_rate;
    quint32 starting_time;
    quint32 data_length;
};

struct gwavi_stream_header_t //strh
{
    QString data_type;	    /* fccType */
    QString codec;		    /* fccHandler */
    quint32 flags;	    /* dwFlags */
    quint16 priority;
    quint16 language;
    quint32 initial_frames;/* dwInitialFrames */
    quint32 time_scale;    /* dwScale */
    quint32 data_rate;	    /* dwRate */
    quint32 start_time;    /* dwStart */
    quint32 data_length;   /* dwLength */
    quint32 buffer_size;   /* dwSuggestedBufferSize */
    quint32 quality; /* dwQuality */
    quint32 sample_size;   /* dwSampleSize */
    quint16 left;
    quint16 top;
    quint16 right;
    quint16 bottom;
};

struct gwavi_stream_format_v_t //strf
{
    quint32 header_size;
    quint32 width;
    quint32 height;
    quint16 num_planes;
    quint16 bits_per_pixel;
    QString compression_type;
    quint32 image_size;
    quint32 x_pels_per_meter;
    quint32 y_pels_per_meter;
    quint32 colors_used;
    quint32 colors_important;
    quint32 *palette;
    quint32 palette_count;
};

struct gwavi_stream_format_a_t
{
    quint16 format_type;
    quint32 channels;
    quint32 sample_rate;
    quint32 bytes_per_second;
    quint32 block_align;
    quint32 bits_per_sample;
    quint16 size;
};

struct gwavi_t
{
    QByteArray *out;
    gwavi_header_t avi_header;
    gwavi_stream_header_t stream_header_v;
    gwavi_stream_format_v_t stream_format_v;
    gwavi_stream_header_t stream_header_a;
    gwavi_stream_format_a_t stream_format_a;
    long marker;
//    int offsets_ptr;
//    int offsets_len;
//    long offsets_start;
//    uint *offsets;
//    int offset_count;
    QList<quint32> lstStart;
    QList<quint32> lstLen;
};

struct gwavi_audio_t
{
    uint channels;
    uint bits;
    uint samples_per_second;
};

#endif // AVI_PRIVATE_H
